x86/hvm: add pkeys support for cpuid handling
authorHuaitong Han <huaitong.han@intel.com>
Wed, 24 Feb 2016 11:05:20 +0000 (12:05 +0100)
committerJan Beulich <jbeulich@suse.com>
Wed, 24 Feb 2016 11:05:20 +0000 (12:05 +0100)
commitd0575cc51d6c50da4ea06062e4d519e7c60a1f40
tree2d5ab5973bde648b7e3263747d3e389a22e0c8b8
parentfbf9971241fbc9f8ceb36454f152c8e89d056b25
x86/hvm: add pkeys support for cpuid handling

This patch adds pkeys support for cpuid handing.

Pkeys hardware support is CPUID.7.0.ECX[3]:PKU. software support is
CPUID.7.0.ECX[4]:OSPKE and it reflects the support setting of CR4.PKE.

X86_FEATURE_OSXSAVE depends on guest X86_FEATURE_XSAVE, but cpu_has_xsave
function reflects hypervisor X86_FEATURE_XSAVE, it is fixed too.

Signed-off-by: Huaitong Han <huaitong.han@intel.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
tools/libxc/xc_cpufeature.h
tools/libxc/xc_cpuid_x86.c
xen/arch/x86/hvm/hvm.c